
import React, { useCallback, useContext, useMemo, useRef, useState } from "react";


import JfAndDfTable from "./jfAndDfTable";
// import SkipTestTable from "./skipTestTable";
import { TreeSelectKeyContext } from "../index";
import ComponentTableList from "./components/componentTableList";
import ConditionalQueryTableList from "./components/conditionalQueryTableList";


const RightTables = (props: any) => {

    const { treeSelecNode } = useContext<any>(TreeSelectKeyContext);

    const { treeSelectKey } = treeSelecNode;

    const aaaaa = () => {
        if (treeSelectKey === '0-0-0' || treeSelectKey === '0-0-0-0') {
            return <JfAndDfTable />
        } else if (treeSelectKey === '0-0-1' || treeSelectKey === '0-0-0-1' ||
            treeSelectKey === '0-0-0-2' || treeSelectKey === '0-0-0-3' || treeSelectKey === '0-0-0-4'
        ) {
            return <ComponentTableList />
        } else if (treeSelectKey === '0-0-0-5') {
            return <ConditionalQueryTableList />
        }

        return treeSelectKey
    }

    return (
        <div style={{ height: "100%" }}>
            {aaaaa()}
        </div>
    )
}
export default RightTables;